<div id="mainContent">
	<h2>
		Авторизуйтесь:
	</h2>
	<div class="entitiesForm">
		<form action="<?= URL::site('entities/auth') ?>" method="post">
			<table width="100%" cellspacing="5" cellpadding="5">
				<tr>
					<td width="20%">Логин (email)</td>
					<td><input type="text" name="login" class="searchInput" style="position: relative" /></td>
				</tr>
				<tr>
					<td>Пароль</td>
					<td><input type="password" name="password" class="searchInput" style="position: relative" /></td>
				</tr>
				<tr>
					<td></td>
					<td>
						<input type="submit" value="Войти" class="blueButton" />
					</td>
				</tr>		
				<tr>
					<td>
					</td>
					<td>
						<?= (!empty($authError)) ? '<div style="color: red">Неверный логин или пароль!</div>' : '' ?>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<h2>
		Или зарегистрируйтесь:
	</h2>
	<div class="entitiesForm">
		<form action="<?= URL::site('entities/register') ?>" method="post">
			<table width="100%" cellspacing="5" cellpadding="5">
				<tr>
					<td width="20%" <?= (!empty($errors['responsiblePerson'])) ? 'style="color: red"' : '' ?>>Ответственное лицо</td>
					<td><input type="text" name="responsiblePerson" class="searchInput" style="position: relative" value="<?= (!empty($_POST['responsiblePerson'])) ? $_POST['responsiblePerson'] : '' ?>" /></td>
				</tr>
				<tr>
					<td <?= (!empty($errors['companyName'])) ? 'style="color: red"' : '' ?>>Название компании</td>
					<td><input type="text" name="companyName" class="searchInput" style="position: relative" value="<?= (!empty($_POST['companyName'])) ? $_POST['companyName'] : '' ?>" /></td>
				</tr>
				<tr>
					<td <?= (!empty($errors['phone'])) ? 'style="color: red"' : '' ?>>Телефон</td>
					<td><input type="text" name="phone" class="searchInput" style="position: relative" value="<?= (!empty($_POST['phone'])) ? $_POST['phone'] : '' ?>" /></td>
				</tr>
				<tr>
					<td <?= (!empty($errors['email'])) ? 'style="color: red"' : '' ?>>Логин (email)</td>
					<td><input type="text" name="email" class="searchInput" style="position: relative" value="<?= (!empty($_POST['email'])) ? $_POST['email'] : '' ?>" /></td>
				</tr>
				<tr>
					<td <?= (!empty($errors['password'])) ? 'style="color: red"' : '' ?>>Пароль</td>
					<td><input type="password" name="password" class="searchInput" style="position: relative" value="<?= (!empty($_POST['password'])) ? $_POST['password'] : '' ?>" /></td>
				</tr>
				<tr>
					<td <?= (!empty($errors['passwordRepeat'])) ? 'style="color: red"' : '' ?>>Повтор пароля</td>
					<td><input type="password" name="passwordRepeat" class="searchInput" style="position: relative" value="<?= (!empty($_POST['passwordRepeat'])) ? $_POST['passwordRepeat'] : '' ?>" /></td>
				</tr>
				<tr>
					<td valign="center" <?= ($captcha_error) ? 'style="color: red"' : '' ?>>Капча</td>
					<td valign="center">
						<input type="text" name="captcha" class="searchInput" style="position: relative" /><br /><br />
						<?= $captcha_image ?>
					</td>
				</tr>
				<tr>
					<td></td>
					<td>
						<input type="submit" value="Зарегистрироваться" class="blueButton" />
					</td>
				</tr>		
			</table>
		</form>
	</div>
</div>